package org.jbp.timelapse;

import android.hardware.Camera;
import android.hardware.Camera.PictureCallback;

public class TimeLapsePictureCallback implements PictureCallback
{	
	private String fileName;
			
	public TimeLapsePictureCallback(String fileName)
	{
		this.fileName = fileName;
	}
	
	@Override
	public void onPictureTaken(byte[] data, Camera camera)
	{
		(new SavePictureTask()).execute(new TimeLapsePictureData[]{new TimeLapsePictureData(data, fileName, System.currentTimeMillis())});
	}
}
